- content_for :head do
  = javascript_include_tag  'tiny_mce/tiny_mce.js'
  %script{:type => "text/javascript"}
    = "tinyMCE.init({"
    = '   mode : "textareas",'
    = '   theme : "advanced",'
    = '   plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",'
    = '   theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,fontselect,fontsizeselect",'
    = '   theme_advanced_buttons2 : "bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,image,code,|,forecolor,backcolor",'
    = '   theme_advanced_buttons3 : "",'
    = '   theme_advanced_toolbar_location : "top",'
    = '   theme_advanced_toolbar_align : "left",'
    = '   template_external_list_url : "/javascripts/tiny_mce/lists/template_list.js",'
    = '   external_link_list_url : "/javascripts/tiny_mce/lists/link_list.js",'
    = '   external_image_list_url : "/javascripts/tiny_mce/lists/image_list.js",'
    = '   media_external_list_url : "/javascripts/tiny_mce/lists/media_list.js",'
    = "});"
%h1.blog_post New Blog Post
%table.edit_blog_post
  - form_for @blog_post, blog_posts_url, :method => :put do |form|
    %tr
      %td.field_title *Title:
      %td.field= form.text_field     :title
      %td.error= error_message_on    :blog_post, :title
    %tr  
      %td.field_title *Text:
      %td.field
        %textarea{:id =>"blog_post_text", :name => "blog_post[text]", :width => "100%"}
          = @blog_post.text
      %td.error= error_message_on    :blog_post, :text
    %tr
      %td.submit= submit_tag 'Create'